X-Git-Url: https://git.r.bdr.sh/rbdr/super-polarity/blobdiff_plain/f8aec187ea7dc410a32996406109f290f3199ffa..2af83e98005a14c439b360a5b9ac636f594d9f0c:/Super%20Polarity/SuperPolarity.cs diff --git a/Super Polarity/SuperPolarity.cs b/Super Polarity/SuperPolarity.cs index e5f565b..b590079 100644 --- a/Super Polarity/SuperPolarity.cs +++ b/Super Polarity/SuperPolarity.cs @@ -26,7 +26,7 @@ namespace SuperPolarity SuperPolarity.graphics = new GraphicsDeviceManager(this); SuperPolarity.graphics.PreferMultiSampling = true; Content.RootDirectory = "Content"; - ActorFactory.SetContentManager(Content); + ActorFactory.SetGame(this); } /// @@ -38,6 +38,12 @@ namespace SuperPolarity protected override void Initialize() { base.Initialize(); + + InputController.RegisterEventForButton("changePolarity", Buttons.A); + InputController.RegisterEventForKey("changePolarity", Keys.Z); + + InputController.RegisterEventForButton("shoot", Buttons.X); + InputController.RegisterEventForKey("shoot", Keys.X); } /// @@ -51,6 +57,8 @@ namespace SuperPolarity Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2); + ActorFactory.CreateShip(Ship.Polarity.Positive, new Vector2(200, 200)); + ActorFactory.CreateShip(Ship.Polarity.Negative, new Vector2(400, 200)); ActorFactory.CreateMainShip(playerPosition); }